﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Manager.master" AutoEventWireup="true" CodeFile="FavoriteList.aspx.cs" Inherits="User_FavoriteList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="content_area1">
        <h1>Danh sách ưa thích</h1>
        <div style="margin-left:20px;">
            <asp:GridView ID="grvFavorites" runat="server" AutoGenerateColumns="false" OnPageIndexChanging="grvFavorites_PageIndexChanging" 
                AllowPaging="true" PageSize="30" Width="97%" CssClass="tableStyle" OnRowCommand="grvFavorites_RowCommand">
                <Columns>
                    <asp:TemplateField ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left" HeaderText="Tên ưa thích">
                        <ItemTemplate>
                            <a href='<%# Eval("LinkFavorite") %>' target="_blank"><%# Eval("FavoriteName")%></a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField ItemStyle-Width="57%" ItemStyle-HorizontalAlign="Left" HeaderText="Đường dẫn">
                        <ItemTemplate>
                            <a href='<%# Eval("LinkFavorite") %>' target="_blank"><%# Eval("LinkFavorite")%></a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField ItemStyle-Width="11%" ItemStyle-HorizontalAlign="Center" HeaderText="Tùy chọn">
                        <ItemTemplate>
                            <asp:ImageButton ID="btndelete" runat="server" ImageUrl="~/images/Delete.png" CommandName="delete" 
                                CommandArgument='<%#Eval("Id") %>' OnClientClick="return confirm('Bạn có chắc muốn xóa không ?');" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    <b>No record here</b>
                </EmptyDataTemplate>
                <PagerSettings PageButtonCount="50" Position="Bottom" />
                <PagerStyle CssClass="pagination" HorizontalAlign="Left" />
            </asp:GridView>
            <asp:HiddenField ID="hdfCurrentUI" runat="server" />
        </div>
        <br class="clear" />
        <img src="<%= ResolveUrl("~/images/bottom.jpg")%>" align="absbottom" alt="" />
    </div>    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
</asp:Content>

